import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/equipment/list',
    method: 'get',
    params: { query }
  })
}

export function createEquipment(data) {
  return request({
    url: '/equipment/create',
    method: 'post',
    data
  })
}

export function updateEquipment(data) {
  return request({
    url: '/equipment/update',
    method: 'post',
    data
  })
}
export function deleteEquipment(id) {
  return request({
    url: '/equipment/delete',
    method: 'post',
    params: { id }
  })
}
export function fetchOptions() {
  return request({
    url: '/equipment/options',
    method: 'post'
  })
}
export function fetchTrueEquipmentOptions() {
  return request({
    url: '/equipment/getTrueEquipment',
    method: 'get'
  })
}

